home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / 80X86 / REALASM1.ZIP / FTRECIP.ASM < prev    next >
Encoding:
Assembly Source File  |  1993-07-19  |  758 b   |  31 lines

  1. .286
  2. ;=======================================
  3. ; Floating point without a coprocessor
  4. ;
  5. ;---------------------------------------
  6. cseg          segment word public 'code'
  7.               assume  cs:cseg,ss:cseg
  8.               assume  ds:cseg,es:cseg
  9.  
  10.               include math.inc
  11.  
  12. ;=======================================
  13. ; invoke ftrecip, addr real
  14. ;
  15. ; Returns real = 1/real
  16. ;---------------------------------------
  17. ftrecip       proc    near uses si, real:NPR10
  18.               local   one:REAL10
  19.  
  20.               mov     si, real
  21.               invoke  load1, addr one
  22.               invoke  ftdiv, addr one, si
  23.               invoke  movx, si, addr one, 5
  24.  
  25.               ret
  26. ftrecip       endp
  27.  
  28. cseg          ends
  29.               end
  30.  
  31.